package gx.dao.impl.common;

import org.springframework.stereotype.Repository;

import gx.dao.CustomerDao;
import gx.dao.impl.common.BaseDaoImpl;
import gx.entity.Customer;
import gx.entity.common.Page;

@Repository
public class CustomerDaoImpl extends BaseDaoImpl<Customer> implements CustomerDao {
	public Page<Customer> findByName(int size,int number,String lname){
	    String hql="from Customer where lname like ?";
		lname="%" + lname + "%";		
		return find(size, number, hql, lname);
	}
//	public List<Customer> findByName(String name){
//		return find("from Customer where lname like ?", "%"+name+"%");
//		
//	}

	//@Override
	//public Page<Customer> findByName(int size, int number, String name) {
//		return find("from Customer where lname like ?", "%"+name+"%");
//	}
}
